package com.example.win.android_banduyujia.ui.view;

import android.graphics.RectF;

/**
 * Created by Win on 2015/8/27.
 */
public class SelectItem {
    public RectF  rect;
    public String text;

    public boolean  isVisible;

     public SelectItem(RectF rect, String text){
         this.rect = rect;
         this.text = text;
    }

    public RectF getRect() {
        return rect;
    }

    public void setRect(RectF rect) {
        this.rect = rect;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public boolean isVisible(float height) {
        return (rect.bottom <= 0 || rect.top >= height) ? false:true;
    }

    public boolean isInRect(float x, float y) {
        return (rect.bottom >= y && rect.top <= y && x <= rect.right && x >= rect.left) ? true : false;
    }
}
